import 'package:flutter/material.dart';

void main() {
  runApp(MaterialApp(
    home: HomeApp(),
    debugShowCheckedModeBanner: false,
  ));
}

class HomeApp extends StatelessWidget {
  const HomeApp({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Row 组件的使用'),
        leading: Icon(Icons.menu),
        backgroundColor: Colors.orange,
      ),
      body: ColumnComp(),
      bottomNavigationBar: BottomNavigationBar(items: [
        BottomNavigationBarItem(
            icon: Icon(Icons.home), label: '首页', backgroundColor: Colors.red),
        BottomNavigationBarItem(
            icon: Icon(Icons.search), label: '搜索', backgroundColor: Colors.red),
        BottomNavigationBarItem(
            icon: Icon(Icons.person), label: '我的', backgroundColor: Colors.red)
      ]),
    );
  }
}

class ColumnComp extends StatelessWidget {
  const ColumnComp({super.key});

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Container(
        width: 415.0,
        height: 100.0,
        color: Colors.cyan,
        child: Row(
          // 主轴对齐方式:
          mainAxisAlignment: MainAxisAlignment.center,
          // mainAxisAlignment: MainAxisAlignment.spaceAround,
          // mainAxisAlignment: MainAxisAlignment.spaceEvenly,

          // 侧轴对齐方式
          // crossAxisAlignment: CrossAxisAlignment.start,
          crossAxisAlignment: CrossAxisAlignment.center,
          // crossAxisAlignment: CrossAxisAlignment.end,

          children: [
            Image.network(
              'https://yanxuan-item.nosdn.127.net/72e734dd1a4d35ce650afebdaa600b57.png',
              width: 200,
            ),
            const Text('美妆效果嘎嘎不卡粉末面刷'),
            const Text('¥99.90')
          ],
        ),
      ),
    );
  }
}
